package com.woniuxy.third.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author: yangtao
 * @date 2021/7/20 17:44
 * @Version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel
public class Order {
    private int id;
    private String ordernum;  //订单号
    private int uid; //用户id
    @ApiModelProperty(value = "cid",required = true,dataType = "int")
    private int cid;  //课程id
    private int status;  //支付状态
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date time;  //支付时间
    private Course course;  //一条订单对应一门课程
}
